/*
 * JsspMain.java
 *
 * Created on 27 de Maio de 2008, 20:51
 */

package br.uece.paa.sa.jssp.ui;

import br.uece.paa.sa.jssp.alg.JsspSa;
import java.io.File;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.UIManager;


/**
 *
 * @author  Windows XP
 */
public class JsspMain extends javax.swing.JFrame implements Runnable {
    
    private JFileChooser fileChooser;
    File file = null;
    Thread jssp;

	/** Creates new form JsspMain */
    public JsspMain() {
        initComponents();
        fileChooser = new JFileChooser("./instancias");
        fileChooser.setFileFilter(new JsspFileFilter());
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        toolBar = new javax.swing.JToolBar();
        openButton = new javax.swing.JButton();
        runButton = new javax.swing.JButton();
        stopButton = new javax.swing.JButton();
        fileLabel = new javax.swing.JLabel();
        fileText = new javax.swing.JTextField();
        timeElapsedLabel = new javax.swing.JLabel();
        lblSolucaoInicial = new javax.swing.JLabel();
        progressBar = new javax.swing.JProgressBar();
        geraGrafico = new javax.swing.JCheckBox();
        jSeparator1 = new javax.swing.JSeparator();
        confPanel = new javax.swing.JPanel();
        lblAlfa = new javax.swing.JLabel();
        lblP = new javax.swing.JLabel();
        lblM = new javax.swing.JLabel();
        lblL = new javax.swing.JLabel();
        txtL = new javax.swing.JTextField();
        txtM = new javax.swing.JTextField();
        txtP = new javax.swing.JTextField();
        txtAlfa = new javax.swing.JTextField();
        txtSolucaoInicial = new javax.swing.JTextField();
        lblMelhorSolucao = new javax.swing.JLabel();
        txtMelhorSolucao = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        lblTempIni = new javax.swing.JLabel();
        lblTempFim = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Job Shop Scheduling com Simulated Annealing");
        setIconImage(new javax.swing.ImageIcon(getClass().getResource("/br/uece/paa/sa/jssp/ui/img/cc-karm-16x16.png")).getImage());
        setResizable(false);

        toolBar.setFloatable(false);
        toolBar.setBorderPainted(false);
        toolBar.setFocusable(false);
        toolBar.setRequestFocusEnabled(false);

        openButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/uece/paa/sa/jssp/ui/img/folder_yellow_open-32x32.png"))); // NOI18N
        openButton.setText("Abrir");
        openButton.setFocusable(false);
        openButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        openButton.setMaximumSize(new java.awt.Dimension(65, 57));
        openButton.setMinimumSize(new java.awt.Dimension(65, 57));
        openButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        openButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                openButtonActionPerformed(evt);
            }
        });
        toolBar.add(openButton);

        runButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/uece/paa/sa/jssp/ui/img/cache-32x32.png"))); // NOI18N
        runButton.setText("Executar");
        runButton.setEnabled(false);
        runButton.setFocusable(false);
        runButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        runButton.setMaximumSize(new java.awt.Dimension(65, 57));
        runButton.setMinimumSize(new java.awt.Dimension(65, 57));
        runButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        runButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                runButtonActionPerformed(evt);
            }
        });
        toolBar.add(runButton);

        stopButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/uece/paa/sa/jssp/ui/img/stop-32x32.png"))); // NOI18N
        stopButton.setText("Parar");
        stopButton.setEnabled(false);
        stopButton.setFocusable(false);
        stopButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        stopButton.setMaximumSize(new java.awt.Dimension(65, 57));
        stopButton.setMinimumSize(new java.awt.Dimension(65, 57));
        stopButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        stopButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                stopButtonActionPerformed(evt);
            }
        });
        toolBar.add(stopButton);

        fileLabel.setText("Arquivo:");

        fileText.addCaretListener(new javax.swing.event.CaretListener() {
            public void caretUpdate(javax.swing.event.CaretEvent evt) {
                fileTextCaretUpdate(evt);
            }
        });
        fileText.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                fileTextActionPerformed(evt);
            }
        });

        timeElapsedLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/uece/paa/sa/jssp/ui/img/ktimer-32x32.png"))); // NOI18N
        timeElapsedLabel.setText("Tempo gasto: ");

        lblSolucaoInicial.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/uece/paa/sa/jssp/ui/img/cc-vcalendar3-32x32.png"))); // NOI18N
        lblSolucaoInicial.setText("Solucao inicial: ");

        geraGrafico.setSelected(true);
        geraGrafico.setText("Gerar grafico (makespan x iteracoes)");
        geraGrafico.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                geraGraficoActionPerformed(evt);
            }
        });

        confPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        lblAlfa.setText("Alfa (fator de decrescimo da temperatura):");

        lblP.setText("P (limite de perturbacoes por iteracao):");

        lblM.setText("M (numero maximo de iteracoes):");

        lblL.setText("L (limite de sucessos por iteracao):");

        txtL.setColumns(4);
        txtL.setText("100");
        txtL.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtLActionPerformed(evt);
            }
        });
        txtL.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtLFocusGained(evt);
            }
        });

        txtM.setColumns(4);
        txtM.setText("300");
        txtM.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtMFocusGained(evt);
            }
        });

        txtP.setColumns(4);
        txtP.setText("1500");
        txtP.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtPFocusGained(evt);
            }
        });

        txtAlfa.setColumns(4);
        txtAlfa.setText("0.95");
        txtAlfa.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtAlfaFocusGained(evt);
            }
        });

        javax.swing.GroupLayout confPanelLayout = new javax.swing.GroupLayout(confPanel);
        confPanel.setLayout(confPanelLayout);
        confPanelLayout.setHorizontalGroup(
            confPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(confPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(confPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblP)
                    .addComponent(lblAlfa)
                    .addComponent(lblM)
                    .addComponent(lblL))
                .addGap(18, 18, 18)
                .addGroup(confPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtAlfa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(168, 168, 168))
        );
        confPanelLayout.setVerticalGroup(
            confPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(confPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(confPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblL)
                    .addComponent(txtL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(confPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblM)
                    .addComponent(txtM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(confPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblP)
                    .addComponent(txtP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(7, 7, 7)
                .addGroup(confPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblAlfa)
                    .addComponent(txtAlfa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        lblMelhorSolucao.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/uece/paa/sa/jssp/ui/img/services-32x32.png"))); // NOI18N
        lblMelhorSolucao.setText("Melhor solucao:");

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/uece/paa/sa/jssp/ui/img/termometer5.png"))); // NOI18N

        lblTempIni.setText("Temperatura inicial:");

        lblTempFim.setText("Temperatura final:");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(progressBar, javax.swing.GroupLayout.DEFAULT_SIZE, 445, Short.MAX_VALUE)
                    .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 445, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(fileLabel)
                        .addGap(18, 18, 18)
                        .addComponent(fileText, javax.swing.GroupLayout.DEFAULT_SIZE, 386, Short.MAX_VALUE))
                    .addComponent(confPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 445, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(toolBar, javax.swing.GroupLayout.DEFAULT_SIZE, 318, Short.MAX_VALUE)
                            .addComponent(geraGrafico))
                        .addGap(127, 127, 127))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(timeElapsedLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblTempFim, javax.swing.GroupLayout.DEFAULT_SIZE, 225, Short.MAX_VALUE)
                            .addComponent(lblTempIni, javax.swing.GroupLayout.DEFAULT_SIZE, 225, Short.MAX_VALUE)))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(lblSolucaoInicial)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtSolucaoInicial, javax.swing.GroupLayout.DEFAULT_SIZE, 333, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(112, 112, 112)
                        .addComponent(txtMelhorSolucao, javax.swing.GroupLayout.DEFAULT_SIZE, 333, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(lblMelhorSolucao)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 334, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(19, 19, 19))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(toolBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(fileLabel)
                    .addComponent(fileText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(confPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(geraGrafico)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(timeElapsedLabel)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(lblTempIni)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(lblTempFim))
                    .addComponent(jLabel1))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblSolucaoInicial)
                    .addComponent(txtSolucaoInicial, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblMelhorSolucao)
                    .addComponent(txtMelhorSolucao, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void stopButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_stopButtonActionPerformed
// TODO add your handling code here:
    if (jssp != null && jssp.isAlive() && stopButton.isEnabled()) {
        jssp.interrupt();
        
        stopButton.setEnabled(false);
        runButton.setEnabled(true);
    }
    
    //System.out.println("stop "+jssp.getState());
    
}//GEN-LAST:event_stopButtonActionPerformed

private void openButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openButtonActionPerformed
// TODO add your handling code here:
	
    int returnVal = fileChooser.showOpenDialog(this);

    if (returnVal == JFileChooser.APPROVE_OPTION)
        file = fileChooser.getSelectedFile();
    else if (returnVal == JFileChooser.CANCEL_OPTION){
    	return;
    }

    try {
    	if (file != null){
    		fileText.setText(file.getCanonicalPath());//GEN-LAST:event_openButtonActionPerformed
		runButton.setEnabled(true);
    	} else {
    		JOptionPane.showMessageDialog(this, "Erro de leitura do arquivo", "Erro", JOptionPane.ERROR_MESSAGE);
    	}
    } catch (IOException ex) {
        Logger.getLogger(JsspMain.class.getName()).log(Level.SEVERE, null, ex);
    }
}
private void runButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_runButtonActionPerformed
// TODO add your handling code here:
	int l=0,m=0,p=0;
	double a=0;
        
        file = new File(fileText.getText());
	
	try {
		l = Integer.parseInt(txtL.getText());
		m = Integer.parseInt(txtM.getText());
		p = Integer.parseInt(txtP.getText());
		a = Double.parseDouble(txtAlfa.getText());		
	} catch (NumberFormatException nfe){
		JOptionPane.showMessageDialog(null,
				"Algum parametro esta faltando.\n"
						+ nfe.getMessage(), "Parametro(s) incorreto(s)",
				JOptionPane.ERROR_MESSAGE);
	}
        
    jssp = new Thread(new JsspSa(file, geraGrafico.isSelected(), l, m, p, a, this));
    jssp.start();
    stopButton.setEnabled(true);
    runButton.setEnabled(false);
}//GEN-LAST:event_runButtonActionPerformed

private void fileTextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileTextActionPerformed
// TODO add your handling code here:
    
}//GEN-LAST:event_fileTextActionPerformed

private void fileTextCaretUpdate(javax.swing.event.CaretEvent evt) {//GEN-FIRST:event_fileTextCaretUpdate
// TODO add your handling code here:
    if (fileText.getText().equals(""))
        runButton.setEnabled(false);
}//GEN-LAST:event_fileTextCaretUpdate

private void txtLActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtLActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_txtLActionPerformed

private void geraGraficoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_geraGraficoActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_geraGraficoActionPerformed

private void txtLFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtLFocusGained
// TODO add your handling code here:
    txtL.selectAll();
}//GEN-LAST:event_txtLFocusGained

private void txtMFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtMFocusGained
// TODO add your handling code here:
    txtM.selectAll();
}//GEN-LAST:event_txtMFocusGained

private void txtPFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtPFocusGained
// TODO add your handling code here:
    txtP.selectAll();
}//GEN-LAST:event_txtPFocusGained

private void txtAlfaFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtAlfaFocusGained
// TODO add your handling code here:
    txtAlfa.selectAll();
}//GEN-LAST:event_txtAlfaFocusGained
    
                                          
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
	} catch (Exception e) {}
        
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new JsspMain().setVisible(true);
            }
        });
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel confPanel;
    private javax.swing.JLabel fileLabel;
    private javax.swing.JTextField fileText;
    private javax.swing.JCheckBox geraGrafico;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JLabel lblAlfa;
    private javax.swing.JLabel lblL;
    private javax.swing.JLabel lblM;
    private javax.swing.JLabel lblMelhorSolucao;
    private javax.swing.JLabel lblP;
    private javax.swing.JLabel lblSolucaoInicial;
    private javax.swing.JLabel lblTempFim;
    private javax.swing.JLabel lblTempIni;
    private javax.swing.JButton openButton;
    private javax.swing.JProgressBar progressBar;
    private javax.swing.JButton runButton;
    private javax.swing.JButton stopButton;
    private javax.swing.JLabel timeElapsedLabel;
    private javax.swing.JToolBar toolBar;
    private javax.swing.JTextField txtAlfa;
    private javax.swing.JTextField txtL;
    private javax.swing.JTextField txtM;
    private javax.swing.JTextField txtMelhorSolucao;
    private javax.swing.JTextField txtP;
    private javax.swing.JTextField txtSolucaoInicial;
    // End of variables declaration//GEN-END:variables

    public void run() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

	public javax.swing.JProgressBar getProgressBar() {
		return progressBar;
	}

	public javax.swing.JLabel getTimeElapsedLabel() {
		return timeElapsedLabel;
	}

	public javax.swing.JTextField getTxtMelhorSolucao() {
		return txtMelhorSolucao;
	}

	public javax.swing.JTextField getTxtSolucaoInicial() {
		return txtSolucaoInicial;
	}
        
        public javax.swing.JButton getRunButton(){
            return runButton;
        }
        
        public javax.swing.JButton getStopButton(){
            return stopButton;
        }
        
        public javax.swing.JLabel getLblTempIni() {
		return lblTempIni;
	}
        
        public javax.swing.JLabel getLblTempFim() {
		return lblTempFim;
	}
    
}
